#include <memory>

#include "Log.hpp"
#include"UdpServer.hpp"


//【./udp_Client  sever_port】
int main(int argc,char*argv[])
{
    //1.格式：
    if(argc != 2)
    {
        std::cerr << "Usage: " << "sever_ip sever_port" << std::endl;
        Die(1);
    }
    // std::string ip = argv[1];
    uint16_t port = std::stoi(argv[1]);

    ENABLE_CONSOLE();
    std::unique_ptr<UdpServer> svr_ptr = std::make_unique<UdpServer>(port);

    svr_ptr->InitS();

    svr_ptr->Start();

    return 0;
}